#include <stdio.h>
#include "../model/globals.h"
#include "../normalization/normalized_datatypes.h"
#include "../normalization/globals.h"
#include <Judy.h>

void print_subsumers(NormalizedAtomicConcept* ac) {
	Word_t index;
	int judy_return;
	
	index = 0;
	J1F(judy_return, ac->subsumers, index);
	while (judy_return == 1) {
		// ac is also in its subsumer list, do not print it
		if (((NormalizedConcept*) index)->type == NORMALIZED_ATOMIC_CONCEPT && ac != ((NormalizedConcept*) index)->description.atomic)
			printf("SubClassOf(%s %s)\n", ac->name,((NormalizedConcept*) index)->description.atomic->name);
		J1N(judy_return, ac->subsumers, index);
	}
}

void print_subsumer_lists() {
	int i;

	for (i = 0; i < normalized_atomic_concept_count; ++i)
		print_subsumers(normalized_atomic_concepts[i]->description.atomic);
}
